home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr05
/
att33all.zip
/
ALERTS.FRM
< prev
next >
Wrap
Text File
|
1995-02-08
|
21KB
|
694 lines
VERSION 2.00
Begin Form AlertsForm
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Alerts"
ClientHeight = 4965
ClientLeft = 8235
ClientTop = 1920
ClientWidth = 5070
ControlBox = 0 'False
Height = 5400
Left = 8160
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4965
ScaleWidth = 5070
Top = 1560
Width = 5220
Begin TextBox WarningMess
BackColor = &H00FFFFFF&
Height = 312
Index = 2
Left = 960
MultiLine = -1 'True
TabIndex = 21
Text = "Eek!"
Top = 3780
Width = 3612
End
Begin TextBox WarningMess
BackColor = &H00FFFFFF&
Height = 312
Index = 1
Left = 960
MultiLine = -1 'True
TabIndex = 20
Text = "Warning:"
Top = 3360
Width = 3612
End
Begin TextBox WarningMess
BackColor = &H00FFFFFF&
Height = 312
Index = 0
Left = 960
MultiLine = -1 'True
TabIndex = 19
Text = "OK"
Top = 2940
Width = 3612
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 315
Index = 6
Left = 3600
MultiLine = -1 'True
TabIndex = 2
Text = "0"
Top = 480
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 315
Index = 7
Left = 3600
MultiLine = -1 'True
TabIndex = 5
Text = "0"
Top = 900
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000012&
Height = 315
Index = 8
Left = 3600
MultiLine = -1 'True
TabIndex = 8
Text = "0"
Top = 1200
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 315
Index = 9
Left = 3600
MultiLine = -1 'True
TabIndex = 11
Text = "0"
Top = 1680
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 315
Index = 10
Left = 3600
MultiLine = -1 'True
TabIndex = 14
Text = "0"
Top = 1980
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 315
Index = 11
Left = 3600
MultiLine = -1 'True
TabIndex = 17
Text = "0"
Top = 2280
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
Height = 315
Index = 5
Left = 2160
MultiLine = -1 'True
TabIndex = 16
Text = "0"
Top = 2280
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
Height = 315
Index = 4
Left = 2160
MultiLine = -1 'True
TabIndex = 13
Text = "0"
Top = 1980
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
Height = 315
Index = 3
Left = 2160
MultiLine = -1 'True
TabIndex = 10
Text = "0"
Top = 1680
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
Height = 315
Index = 2
Left = 2160
MultiLine = -1 'True
TabIndex = 7
Text = "0"
Top = 1200
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
Height = 315
Index = 1
Left = 2160
MultiLine = -1 'True
TabIndex = 4
Text = "0"
Top = 900
Width = 972
End
Begin TextBox WarningVal
Alignment = 1 'Right Justify
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 315
Index = 0
Left = 2160
MultiLine = -1 'True
TabIndex = 1
Text = "0"
Top = 480
Width = 972
End
Begin SSCheck Check3D1
Caption = "&GDI"
ForeColor = &H00000000&
Height = 315
Index = 5
Left = 480
TabIndex = 15
Top = 2256
Width = 732
End
Begin SSCheck Check3D1
Caption = "&Memory"
ForeColor = &H00000000&
Height = 315
Index = 1
Left = 480
TabIndex = 3
Top = 900
Width = 1080
End
Begin SSCheck Check3D1
Caption = "&Resources"
ForeColor = &H00000000&
Height = 315
Index = 3
Left = 480
TabIndex = 9
Top = 1656
Width = 1215
End
Begin SSCheck Check3D1
Caption = "Dis&k Space"
ForeColor = &H00000000&
Height = 315
Index = 0
Left = 480
TabIndex = 0
Top = 480
Width = 1212
End
Begin SSCheck Check3D1
Caption = "Largest &B-lock"
ForeColor = &H00000000&
Height = 315
Index = 2
Left = 480
TabIndex = 6
Top = 1200
Width = 1545
End
Begin SSCheck Check3D1
Caption = "&User"
ForeColor = &H00000000&
Height = 315
Index = 4
Left = 480
TabIndex = 12
Top = 1956
Width = 780
End
Begin CommandButton Command3
Cancel = -1 'True
Caption = "Cancel"
Height = 330
Left = 2640
TabIndex = 23
Top = 4368
Width = 1215
End
Begin CommandButton Command1
Caption = "OK"
Default = -1 'True
Height = 330
Left = 1200
TabIndex = 22
Top = 4380
Width = 1215
End
Begin Image Image1
Height = 252
Index = 2
Left = 0
Top = 0
Visible = 0 'False
Width = 252
End
Begin Image Image1
Height = 252
Index = 5
Left = 480
Top = 2940
Width = 252
End
Begin Image Image1
Height = 252
Index = 4
Left = 480
Top = 3780
Width = 240
End
Begin Image Image1
Height = 252
Index = 3
Left = 480
Top = 3360
Width = 240
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "&Legend"
Height = 192
Index = 15
Left = 480
TabIndex = 18
Top = 2700
Width = 636
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "%"
Height = 192
Index = 13
Left = 4596
TabIndex = 37
Top = 2340
Width = 168
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "%"
Height = 192
Index = 12
Left = 4596
TabIndex = 36
Top = 2040
Width = 168
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "%"
Height = 192
Index = 11
Left = 4596
TabIndex = 35
Top = 1740
Width = 168
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "k"
Height = 192
Index = 10
Left = 4596
TabIndex = 34
Top = 1260
Width = 108
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "k"
Height = 192
Index = 9
Left = 4596
TabIndex = 33
Top = 960
Width = 108
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "k"
Height = 192
Index = 8
Left = 4596
TabIndex = 32
Top = 540
Width = 108
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "%"
Height = 192
Index = 7
Left = 3156
TabIndex = 31
Top = 2340
Width = 168
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "%"
Height = 192
Index = 6
Left = 3156
TabIndex = 30
Top = 2040
Width = 168
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "%"
Height = 192
Index = 5
Left = 3156
TabIndex = 29
Top = 1740
Width = 168
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "k"
Height = 192
Index = 4
Left = 3156
TabIndex = 28
Top = 1260
Width = 108
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "k"
Height = 192
Index = 3
Left = 3156
TabIndex = 27
Top = 960
Width = 108
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "k"
Height = 192
Index = 2
Left = 3156
TabIndex = 26
Top = 540
Width = 108
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "Alert"
Height = 192
Index = 1
Left = 4080
TabIndex = 24
Top = 240
Width = 396
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "Warning"
Height = 192
Index = 0
Left = 2400
TabIndex = 25
Top = 240
Width = 492
End
Begin Image Image1
Height = 252
Index = 1
Left = 3840
Top = 240
Width = 240
End
Begin Image Image1
Height = 252
Index = 0
Left = 2160
Top = 240
Width = 252
End
End
Option Explicit
Sub Check3D1_Click (Index As Integer, Value As Integer)
WarningVal(Index).Enabled = Value
WarningVal(Index + gAlertItems).Enabled = Value
If Value Then
WarningVal(Index).ForeColor = 0
WarningVal(Index + gAlertItems).ForeColor = 0
Else
WarningVal(Index).ForeColor = &HC0C0C0
WarningVal(Index + gAlertItems).ForeColor = &HC0C0C0
End If
If Index = 1 Then
Check3d1(2).Enabled = Value
If Value And Check3d1(2).Value Then
WarningVal(2).ForeColor = 0
WarningVal(2 + gAlertItems).ForeColor = 0
Else
WarningVal(2).ForeColor = &HC0C0C0
WarningVal(2 + gAlertItems).ForeColor = &HC0C0C0
End If
End If
If Index = 3 Then
Check3d1(4).Enabled = Not Value
Check3d1(5).Enabled = Not Value
If Value Then
Check3d1(4).Value = False
Check3d1(5).Value = False
End If
End If
End Sub
Sub Command1_Click ()
Dim I%, J%
'ok
For I% = 0 To gAlertItems * 2 - 1
Call Refm(I%, True)
Next I%
For I% = 0 To gAlertItems - 1
If Check3d1(I%).Value And Check3d1(I%).Enabled Then
If Val(WarningVal(I%).Text) < Val(WarningVal(I% + gAlertItems).Text) Then
MsgBox "Alert value is greater then warning value", 48
WarningVal(I%).SetFocus
Exit Sub
End If
End If
Next I%
For I% = 0 To gAlertItems - 1
For J% = 0 To 1
gWarningLevels(I%, J%) = Val(WarningVal(I% + (J% * gAlertItems)).Text)
Next J%
Next I%
For I% = 0 To gAlertItems - 1
gWarning(I%) = Check3d1(I%).Value And Check3d1(I%).Enabled
Next I%
For J% = 0 To 2
gWarningMessages(J%) = WarningMess(J%).Text
Next J%
Unload Me
End Sub
Sub Command3_Click ()
'Cancel
Unload Me
End Sub
Sub Form_Load ()
Dim T$
Dim I%
Dim J%
For I% = 0 To gAlertItems - 1
Check3d1(I%).Value = True
Next I%
For I% = 0 To gAlertItems - 1
Check3d1(I%).Value = False
Next I%
Image1(0).Picture = AllTheTime.MoonSun.GraphicCell(44)
Image1(1).Picture = AllTheTime.MoonSun.GraphicCell(49)
Image1(2).Picture = AllTheTime.MoonSun.GraphicCell(43)
For I% = 0 To 2
T$ = Label2(I%).Caption
Label2(I%).Caption = "" 'autosize?
Label2(I%).Caption = T$ 'autosize?
WarningMess(I%).Text = gWarningMessages(I%)
Image1(I% + 3).Picture = Image1(I%).Picture
Next I%
'Label2(1).Caption = Label2(1).Caption
Label2(0).Left = WarningVal(0).Left + WarningVal(0).Width - Label2(0).Width
Label2(1).Left = WarningVal(gAlertItems).Left + WarningVal(gAlertItems).Width - Label2(1).Width
Image1(0).Left = Label2(0).Left - Image1(0).Width - 30
Image1(1).Left = Label2(1).Left - Image1(1).Width - 30
'Image1(2).Left = Check3d1(1).Left
'Label2(2).Left = Image1(2).Left + Image1(2).Width + 30
'Image1(2).Top = Image1(0).Top
'If Label2(0).Left + Label2(0).Width + 120 > Image1(1).Left Then
' Image1(1).Left = Label2(0).Left + Label2(0).Width + 120
' Label2(1).Left = Image1(1).Left + Image1(1).Width
'End If
''Image1(0).BorderStyle = 1
''Image1(1).BorderStyle = 1
''Label2(0).FontSize = 24
Label2(0).Top = Image1(0).Top + (Image1(0).Height - Label2(0).Height) \ 2
Label2(1).Top = Image1(1).Top + (Image1(1).Height - Label2(1).Height) \ 2
'Label2(2).Top = Image1(2).Top + (Image1(2).Height - Label2(2).Height) \ 2
Image1(5).Top = WarningMess(0).Top + (WarningMess(0).Height - Image1(5).Height) \ 2
WarningMess(0).Left = Image1(5).Left + Image1(5).Width + 30
Image1(3).Top = WarningMess(1).Top + (WarningMess(1).Height - Image1(3).Height) \ 2
WarningMess(1).Left = Image1(3).Left + Image1(3).Width + 30
Image1(4).Top = WarningMess(2).Top + (WarningMess(2).Height - Image1(4).Height) \ 2
WarningMess(2).Left = Image1(4).Left + Image1(4).Width + 30
WarningMess(0).Width = (WarningVal(gAlertItems).Left + WarningVal(gAlertItems).Width) - WarningMess(0).Left
WarningMess(1).Width = WarningMess(0).Width
WarningMess(2).Width = WarningMess(0).Width
AlertsForm.Left = Screen.Width / 2 - (AlertsForm.Width / 2)
AlertsForm.Top = Screen.Height / 2 - (AlertsForm.Height / 2)
For I% = 0 To gAlertItems - 1
For J% = 0 To 1
WarningVal(I% + (J% * gAlertItems)).Text = gWarningLevels(I%, J%)
Next J%
Next I%
For I% = 0 To gAlertItems * 2 - 1
Call Refm(I%, False)
Next I%
For I% = 0 To gAlertItems - 1
Check3d1(I%).Value = gWarning(I%)
Next I%
End Sub
Sub Refm (Index As Integer, gf As Integer)
Select Case Index
Case 0, 1, 2, 0 + gAlertItems, 1 + gAlertItems, 2 + gAlertItems:
If gf Then
WarningVal(Index).Text = Format$(WarningVal(Index).Text, "general number")
Else
WarningVal(Index).Text = Format$(WarningVal(Index).Text, "#,##0")
End If
Case 3, 4, 5, 3 + gAlertItems, 4 + gAlertItems, 5 + gAlertItems:
If WarningVal(Index).Text > 100 Then WarningVal(Index).Text = 100
If gf Then
WarningVal(Index).Text = Format$(WarningVal(Index).Text, "general number")
Else
WarningVal(Index).Text = Format$(WarningVal(Index).Text, "#,##0")
End If
End Select
End Sub
Sub WarningMess_GotFocus (Index As Integer)
WarningMess(Index).SelStart = 0
WarningMess(Index).SelLength = 30000
End Sub
Sub WarningVal_GotFocus (Index As Integer)
Call Refm(Index, True)
WarningVal(Index).SelStart = 0
WarningVal(Index).SelLength = 30000
End Sub
Sub WarningVal_KeyPress (Index As Integer, KeyAscii As Integer)
If ((Chr$(KeyAscii) < "0") Or (Chr$(KeyAscii) > "9")) And (Chr$(KeyAscii) <> ",") And (KeyAscii <> 8) Then KeyAscii = 0
End Sub
Sub WarningVal_LostFocus (Index As Integer)
Call Refm(Index, False)
End Sub